# Please install OpenAI SDK first: `pip3 install openai`

from openai import OpenAI


client = OpenAI(
    api_key="sk-c6a30d4677b940b995c03763aab93172", base_url="https://api.deepseek.com"
)


def instance() -> OpenAI:
    response = client.chat.completions.create(
        model="deepseek-chat",
        messages=[
            {"role": "system", "content": "You are a helpful assistant"},
            {"role": "user", "content": "Hello"},
        ],
        stream=False,
    )

    return response.choices[0].message.content
def function_calling(messages,tools):
    response = client.chat.completions.create(
        model="deepseek-chat",
        messages=messages,
        tools=tools
    )
    return response.choices[0].message